UTIL = ../src/util
OBO = http://purl.obolibrary.org/obo

all: sample-registry.ttl

legacy-metadata-file.txt:
	wget http://obo.cvs.sourceforge.net/viewvc/obo/obo/website/cgi-bin/ontologies.txt -O $@

sample-registry.ttl: legacy-metadata-file.txt
	$(UTIL)/convert-legacy-metadata-to-ttl.pl $< > $@.tmp && mv $@.tmp $@

# derived
%-metadata.owl:
	owltools $(OBO)/$*.owl --extract-ontology-metadata -c $(OBO)/$@ -o file://`pwd`/$@

